/*
 *  Copyright 2009 Utkin Dmitry
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
 
/* 
 *  This file is part of the WSF Staff project.
 *  Please, visit http://code.google.com/p/staff for more information.
 */

// This file generated by staff_codegen
// DO NOT EDIT

#ifndef _$(Interface.Name)Wrapper_h_
#define _$(Interface.Name)Wrapper_h_

#include <staff/component/Service.h>

#foreach $(Interface.Classes)
$(Class.OpeningNs)
  class $(Class.Name)Impl;

  //! $(Class.ServiceName) service wrapper
  class $(Class.Name)Wrapper: public staff::CService
  {
  public:
    //!         default constructor
    $(Class.Name)Wrapper();

    //!         initializing constructor
    /*! \param  pComponent - service's component
    */
    $(Class.Name)Wrapper(staff::CComponent* pComponent);

    //!         destructor
    virtual ~$(Class.Name)Wrapper();

    //!         get service name
    /*! \return service name
    */
    const rise::CString& GetName() const;

    //!         get service description
    /*! \return service description
    */
    const rise::CString& GetDescr() const;
    
    //!         get service operations
    /*! \return service operations DataObject
    */
    virtual staff::CDataObject GetOperations() const;

    //!         get service description
    /*! \return service description
    */
    virtual staff::CDataObject GetServiceDescription() const;
    
    //!         invoke service operation
    /*! \param  rOperation - service operation
        \param  sID - service session id
        */
    void Invoke(staff::COperation& rOperation, const rise::CString& sID);

    //!         get service's component
    /*! \return service's component
    */
    const staff::CComponent* GetComponent() const;

    //!         get service's component
    /*! \return service's component
    */
    staff::CComponent* GetComponent();

    //!         get pointer to service implementation(only for local)
    /*! \param  sID - service session id
        \return pointer to service implementation
        */
    void* GetImpl(const rise::CString& sID);

  protected:
    //!         get service implementation
    /*! \param  sID - session id
        \return service implementation
    */
    $(Class.Name)Impl& ServiceImpl(const rise::CString& sID);
  
  private:
    class $(Class.Name)WrapperImpl;
    $(Class.Name)WrapperImpl* m_pImpl;
  };
$(Class.EndingNs)

#end
#endif // _$(Interface.Name)Wrapper_h_
